<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="app" uri="/application" %>
<%@ taglib  prefix="s"  uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<link href="../css/css.css" rel="stylesheet" type="text/css" />
<link href="../css/dtree.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../scripts/dtreeAuth.js"></script>
<style type="text/css">
   .art_ul {overflow: hidden;}
   .art_ul li{padding:2px;margin:2px;display:block;overflow: hidden;border:1px solid #666;float:left;width:130px;border:1px solid #666}
   .art_ul li img{width:120px;height:88px;}
   .art_ul div{padding:2px;}
   .content_main table td {text-align: left;}
</style>

</head>
<body>
<div id="all_main">
  <div class="head_main">
    <div class="main_nav">展览活动-&gt;添加|编辑展览活动</div>
    <div class="main_soso">
    	
    </div>
    <div class="main_title">
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
          <th width="100%" style="border-left:none;text-align: left;font-weight: normal;">展览活动基本信息 </th>
        </tr>
      </table>
    </div>
  </div>
  <div class="content_main">
    <form action="/show/su_show_campaign.shtml" name="form01" method="post" enctype="multipart/form-data">
    <input name="id" value="${show.id}"  type="hidden"/>
    <table border="0" cellpadding="0" cellspacing="0" width="100%" id="background_hegh01">
      <tr>
        <td width="15%" style="border-left:none" align="right">展览名称：</td>
        <td width=""><input name="show.campaignName" type="text" value="${show.campaignName}" style="width:240px;" class="inputwidth01" id="show.campaignName" maxlength="30" /> <span style="color:red;">*</span>
        </td>
      </tr>
      <tr>
        <td width="15%" style="border-left:none" align="right">主办方：</td>
        <td width=""><input name="show.sponsor" value="${show.sponsor}" type="text" size="8" style="width:240px;" class="inputwidth01" id="show.sponsor"/> <span style="color:red;">*</span></td>
      </tr>
      
      <tr>
        <td width="15%" style="border-left:none" align="right">展览场地：</td>
        <td width="">
            <select name="show.addId">
               <option value="">请选择...</option>
               <c:forEach items="${list}" var="o">
               <option  value="${o.id}"  <c:if test="${show.addId==o.id}">selected="selected"</c:if>>${o.address}-${o.arName}</option>
               </c:forEach>
            </select>               
        </td>
      </tr>
      
      <tr>
        <td width="15%" style="border-left:none" align="right">展览日期：</td>
        <td><input name="show.campaignDate" readonly="readonly" value="<fmt:formatDate value="${show.campaignDate}" pattern="yyyy-MM-dd"/>"  type="text" size="8" onclick="new Calendar().show(this,null,null);"  class="date_type" id="show.campaignDate"/> <span style="color:red;">*</span>
        </td>
      </tr>
      <!-- 
            <tr>
        <td width="15%" style="border-left:none" align="right">缩略图：</td>
        <td width="">
        
        
        <input name="show.icoPath" value="${show.icoPath}" type="text" size="8" style="width:240px;" class="inputwidth01" id="show.icoPath_input"/> <span style="color:red;">*</span><input name="" id="show.icoPath" type="button" class="input01" value="选择文件..." /></td>
      </tr>
      
       -->

      <tr>
        <td width="15%" style="border-left:none" align="right">海报：</td>
        <td width="">
        <input name="show.imgPath"   value="${show.imgPath}" proxy="uploadDiv"  type="hidden" size="8"  class="inputwidth01"  id="show.imgPath"/> 
               <div id="uploadDiv" class="uploadDiv">
		                 <a href="#" class="fbtn">选择文件</a><input name="resource" value="" id="uploadFile" size="1" class="ufile" type="file"/>
		                 <div class="rate" id="rate" style="display:none;"></div>
		       </div>

        </td>
      </tr>
      
      
      <tr>
        <td width="15%" style="border-left:none" align="right">展览简介：</td>
        <td width="">
                <textarea rows="8" cols="80" name="show.showDesc">${show.showDesc}</textarea>       
        </td>
      </tr>
    </table>
    </form>
  </div>
  <div class="lapel" style="background:#FFFFFF;"><span><input name="" type="button" class="input01" value="保存" onclick="validate.submit();"/>&nbsp;
  <input name="" type="button" class="input01" value="返回展览列表" onclick="javascript:document.location='/show/search_show_campaign.shtml'"/></span></div>
  
    
  <!-- 
	   <c:if test="${!empty show}">
	  
	  <div class="main_title" style="background: #F4F4F4">
	      <table border="0" cellpadding="0" cellspacing="0" width="100%">
	        <tr>
	          <th width="100%" style="border-left:none;text-align: left;font-weight: normal;">展览作品信息   <a href="/show/to_show_product.shtml?id=${show.id}">添加展览作品</a> </th>
	        </tr>
	      </table>
	    </div>
	  
	
	  
	  <div class="content_main">
	    <ul class="art_ul" id="art_ul">
		   <c:forEach items="${show.showProducts}" var="o">
		       <li><div><app:image src="${o.product.icoPath}"></app:image></div>
		       <div style=""> 标题:${o.product.productName}<br><a href="javascript:WBPage.deleteSource(${o.id});">删除展出作品</a></div></li>
		   </c:forEach>
	
	    </ul>
	  </div>
	  
	  
	  </c:if>
   -->
  
 
  
   
  
</div>
 <iframe  style="display:none" src="about:blank" name="ifrComposeAttachUpload"></iframe>

</body>
</html>
<script type="text/javascript" src="/scripts/util.js"></script>
<script type="text/javascript" src="/scripts/form_validate.js"></script>
<script type="text/javascript" src="/scripts/calendar.js"></script>
<script type="text/javascript" src="/scripts/wb.js"></script>
<script type="text/javascript" src="/scripts/page.js"></script>
<script type="text/javascript" src="/scripts/xhr.js"></script>
<script type="text/javascript" src="/scripts/wooboo.js"></script>
<script type="text/javascript" src="/system/config_js.shtml"></script>
<script type="text/javascript">
new FILE({div:"uploadDiv",input:"show.imgPath",form:"resourceForm",fileinput:"uploadFile",rate:"rate",ftp:Config["image.cache"],suffix:/.jpg|.png|.bmp|.gif/i});

//new WBFS({url:'/resource/to_resource.shtml',title:'选择文件',btn:"show.icoPath"});
//new WBFS({url:'/resource/to_resource.shtml',title:'选择文件',btn:"show.imgPath"});
validate.addvalidte(document.form01,{
        rules:{
           "show.campaignName":{checkNull:true},
           "show.sponsor":{checkNull:true},
           "show.addId":{checkNull:true},
           "show.campaignDate":{checkNull:true},
           "show.icoPath":{checkNull:true,suffix:/.jpg|.png|.bmp|.gif/i},
           "show.imgPath":{checkNull:true,suffix:/.jpg|.png|.bmp|.gif/i}
           },
	    message:{
	    }
	    });
	WBPage.deleteSource=function(id){
	   if(confirm("确定删除此数据信息?")){
	      window.location="/show/delete_show_product.shtml?id="+id
	   }
	}    
	    
	WBPage.add_video=function(){
	  if(!util.$('add_li')){
		   var ul = util.$("art_ul");
		  var li = util.cElem("li",{id:"add_li"});
		  var _html='';
		  _html+='<form action="" >';
		  _html+='<input type="hidden" value="" name="res.artInfo.id" />';
		  _html+='<input type="hidden" value="" name="res.imgPath" id="div_btn_input" />';
		  _html+='<div id="div_btn" style="cursor:pointer;"> <img src="http://y3.ifengimg.com/a/2013_10/7bab8f91c262ff0.jpg"/></div>';
		  _html+='<div style="line-height: 28px;">';
		  _html+='android视频：<input type="text" name="res.androidPath" style="width: 300px;" /><br/>';
		   _html+='&nbsp;&nbsp;&nbsp;&nbsp;iOS视频：<input type="text" name="res.iosPath" style="width: 300px;"/><br/>';
		   _html+='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
		   _html+='<input name="" type="button" class="input01" value="保存视频" onclick="WBPage.fromSubmit(this);"/></div></form> ';
		   li.innerHTML=_html;     
		   ul.insertBefore(li,ul.firstChild);
		   new WBFS({url:'/resource/to_resource.shtml',title:'选择文件',btn:"div_btn",callback:function(t,v){t.button&&(t.button.innerHTML='<img src="'+v+'"/>')}});
	  }
	  WBPage.fromSubmit=function(th){
	      alert(th.form);
	  }
	 
	}
</script>